From: Zeeshan Ali (Khattak) Date: Sat, 15 Feb 2014 15:17:58 +0000 (+0000) Subject: location: Make _connectToGeoclue() reentrent X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~2788 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=12ef034b7ba29404bc3fd4e384115e7b00f3c125;p=gnome-shell.git location: Make _connectToGeoclue() reentrent https://bugzilla.gnome.org/show_bug.cgi?id=723684 --- diff --git a/js/ui/status/location.js b/js/ui/status/location.js index bc42a4e1d..b14bd8abb 100644 --- a/js/ui/status/location.js +++ b/js/ui/status/location.js @@ -41,13 +41,19 @@ const Indicator = new Lang.Class({ }, _connectToGeoclue: function() { + if (this._proxy != null || this._connecting) + return false; + + this._connecting = true; new GeoclueManager(Gio.DBus.system, 'org.freedesktop.GeoClue2', '/org/freedesktop/GeoClue2/Manager', Lang.bind(this, this._onProxyReady)); + return true; }, _onProxyReady: function (proxy, error) { + this._connecting = false; if (error != null) { log (error.message); return;